package com.example.nacosclientrabbit.config;

import org.springframework.amqp.core.FanoutExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 创建队列和交换器
 */
@Configuration
@EnableRabbit
public class QueueConfig {

    @Bean
    public Queue pc(){return new Queue("pc");}

    @Bean
    FanoutExchange pcFanoutExchange(){
        return new FanoutExchange("pcFanoutExchange");
    }
}